package com.sugou.model.datas;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sugou.model.core.base.LongIdEntity;

@Entity(name="ServerRelation")
@Table(name="GW_SERVER_RELATION")
public class ServerRelation extends LongIdEntity {
	private static final long serialVersionUID = 2571953962142805594L;
	
	@ManyToOne(cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	@JoinColumn(name="MERCHANTS_ID")
	private Merchants merchants;
	
	@ManyToOne(cascade={CascadeType.ALL},fetch=FetchType.LAZY)
	@JoinColumn(name="RESIDENTIAL_AREAS_ID")
	private ResidentialAreas residentialAreas;

	public Merchants getMerchants() {
		return merchants;
	}

	public void setMerchants(Merchants merchants) {
		this.merchants = merchants;
	}

	public ResidentialAreas getResidentialAreas() {
		return residentialAreas;
	}

	public void setResidentialAreas(ResidentialAreas residentialAreas) {
		this.residentialAreas = residentialAreas;
	}
	
}
